package com.example.myapplication;

import android.animation.ValueAnimator;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.MotionEvent;
import android.widget.TextView;

import javax.inject.Inject;

import static android.icu.lang.UCharacter.GraphemeClusterBreak.V;

public class DemoActivity extends AppCompatActivity {
    @Inject
    Book book;
    @Inject
    User user;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_demo);
        TextView tv = (TextView) findViewById(R.id.tv);
        TextView tv2 = (TextView) findViewById(R.id.tv2);

        DaggerDemoComponent.builder().demoModule(new DemoModule()).build().inject(this);
        tv.setText(book.user.name);
        tv2.setText(user.name + user.id);
    }

    @Override
        public boolean onTouchEvent(MotionEvent event) {
            int mLastX = 0;
            int mLastY = 0;
            int x = (int) event.getX();
            int y = (int) event.getY();
            switch (event.getAction()) {

                case MotionEvent.ACTION_DOWN:

                    break;
                case MotionEvent.ACTION_UP:

                    break;
                case MotionEvent.ACTION_MOVE:
                    int deltaX = x - mLastX;
                    int deltaY = y - mLastY;
                    break;
            }
            mLastX = x;
            mLastY = y;
            return true;
        }

    
}
